Compressed string-matching in standard Sturmian words
نویسندگان
چکیده
We present a simple algorithm which for an explicitly given input string pat (a pattern) and a standard Sturmian word x described by the recurrences of size n computes, in time O(|pat|+n), the set of all occurrences of pat in x as a single arithmetic progression (modulo the length of x). The algorithm can be extended to the casewhen some letters of the pattern are replaced by a don’t care symbol. In this case the set of all occurrences does not need to be a single arithmetic progression and our algorithm produces linearly many (with respect to the size of pat) arithmetic progressions. It is an example of fast computations for the input given in a compressed form. In our special case the length of the standard Sturmian word x is usually exponential with respect to the size of the input. © 2009 Elsevier B.V. All rights reserved.
منابع مشابه
Occurrence and Lexicographic Properties of Standard Sturmian Words
Standard Sturmian words form an interesting class of structurally highly compressible strings. represented by simple recurrences. We show that simplicity of representation implies new algorithmic results: the compressed string matching for such words can be solved by very special algorithms and the output is simply characterized. Each standard Sturmian word w has Occurrence Shift Property: the ...
متن کاملThe Sum of Exponents of Maximal Repetitions in Standard Sturmian Words
A maximal repetition is a non-extendable (with the same period) periodic segment in a string, in which the period repeats at least twice. In this paper we study problems related to the structure of maximal repetitions in standard Sturmian words and present the formulas for the sum of their exponents. Moreover, we show how to compute the sum of exponents of maximal repetitions in any standard St...
متن کاملUsefulness of Directed Acyclic Subword Graphs in Problems Related to Standard Sturmian Words
The class of finite Sturmian words consists of words having particularly simple compressed representation, which is a generalization of the Fibonacci recurrence for Fibonacci words. The subword graphs of these words (especially their compacted versions) have a very special regular structure. In this paper we investigate this structure in more detail than in previous papers and show how several ...
متن کاملThe Number of Runs in Sturmian Words
Denote by S the class of standard Sturmian words. It is a class of highly compressible words extensively studied in combinatorics of words, including the well known Fibonacci words. The suffix automata for these words have a very particular structure. This implies a simple characterization (described in the paper by the Structural Lemma) of the periods of runs (maximal repetitions) in Sturmian ...
متن کاملThe Maximal Number of Runs in Standard Sturmian Words
We investigate some repetition problems for a very special class S of strings called the standard Sturmian words, which have very compact representations in terms of sequences of integers. Usually the size of this word is exponential with respect to the size of its integer sequence, hence we are dealing with repetition problems in compressed strings. An explicit formula is given for the number ...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
- Theor. Comput. Sci.
دوره 410 شماره
صفحات -
تاریخ انتشار 2009